<template>
  <!-- 运营能力分析 -->
  <div>
    <!-- 顶部搜索框 -->
    <el-row class="data_box">
      <el-date-picker
        v-model="valDate"
        value-format="yyyy-MM-dd"
        type="date"
        placeholder="选择日期"
        size="large"
        :clearable="false"
        :editable="false"
        :picker-options="pickerOptions"
      ></el-date-picker>
      <el-button type="primary" size="small" @click="selectDate('lastDay')">上一天</el-button>
      <el-button
        type="primary"
        size="small"
        v-show="valDate < this.timestampToTime(Date.parse(new Date() + (3600 * 1000 * 24)),'yy-mm-dd')"
        @click="selectDate('following')"
      >下一天</el-button>
      <el-button
        type="primary"
        size="small"
        v-show="valDate != this.timestampToTime(Date.parse(new Date()),'yy-mm-dd')"
        @click="today"
      >当天</el-button>
    </el-row>
    <!-- 内容 -->
    <el-row :gutter="12" class="chart_top">
      <!-- 表1（饼状图） -->
      <el-col :span="8">
        <el-card shadow="always">
          <div style="position: relative;">
            <!-- <img :src="bgImg" class="bgImg" /> -->
            <div id="newPulpLinks"></div>
          </div>
        </el-card>
      </el-col>
      <!-- 表2（折线图） -->
      <el-col :span="8">
        <el-card shadow="always">
          <div style="position: relative;">
            <!-- <img :src="bgImg" class="bgImg" /> -->
            <div id="allPulpLinks"></div>
          </div>
        </el-card>
      </el-col>
      <!-- 表3（饼状图） -->
      <el-col :span="8">
        <el-card shadow="always">
          <div style="position: relative;">
            <!-- <img :src="bgImg" class="bgImg" /> -->
            <div id="gradeAnalysis"></div>
          </div>
        </el-card>
      </el-col>
      <!-- 表4 （甘特图）-->
      <el-col :span="24" style="margin-top: 15px">
        <el-card shadow="always">
          <div style="position: relative;">
            <!-- <img :src="bgImg" class="bgImg" /> -->
            <div id="gantt"></div>
          </div>
        </el-card>
      </el-col>
    </el-row>
    <!-- 放大弹出层 -->
    <el-dialog :visible.sync="chartDialog" :fullscreen='true' :show-close='false'>
        <div id='chartBigId' class="chartDialog"></div>
    </el-dialog>
    <!--设置请输入间隔天数 弹出层 -->
    <el-dialog title="请输入间隔天数" :visible.sync="intervalDay" width='40%' :close-on-click-modal='false'>
      <div class="intervalDayBox">
        1. <el-input type="number" v-model="dataList.firstBlood" :disabled="true"></el-input> ------
        <el-input type="number" v-model="dataList.secondBlood"></el-input> 天
      </div>
       <div class="intervalDayBox">
        2. <el-input type="number" v-model="dataList.secondBlood"></el-input> ------
        <el-input type="number" v-model="dataList.thirdBlood"></el-input> 天
      </div>
       <div class="intervalDayBox">
        3. <el-input type="number" v-model="dataList.thirdBlood"></el-input> ------
        <el-input type="number" v-model="dataList.fourthBlood"></el-input> 天
      </div>
       <div class="intervalDayBox">
        4. <el-input type="number" v-model="dataList.fourthBlood"></el-input> 天以上
      </div>
      <div style="text-align: right">
        <el-button type="primary" size="large" @click="intervalSub">确认</el-button>
      </div>
    </el-dialog>
    <!-- 筛查 弹出层--->
    <el-dialog class="SCDialog" title="筛查" :visible.sync="screeningDialog" :close-on-click-modal='false' width='700px' v-dialogDrag>
      <div class="SCDBox">
         <el-row class="SCTitle"><span></span> 护士</el-row>
         <div style="padding-bottom: 10px;">
            <div style="padding-bottom: 10px;"><el-checkbox  v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox></div>
            <el-checkbox-group v-model="checkedItem">
              <el-checkbox v-for="(item,id) in nurseData" :label="item.id" :key="id" class="checked" @change="checkedChange">{{item.name}}</el-checkbox>
            </el-checkbox-group>
         </div>
          <el-row class="SCTitle"><span></span> 组合查询<span class="SCtips">*以下请输入以00:00格式的分秒</span></el-row>
          <el-row>
             <div><el-checkbox  v-model="checkAll1" @change="handleCheckAllChange1">全选</el-checkbox></div>
              <div class="SCList" v-for="(item,id) in ZHQueryData" :key="id">
                <el-checkbox v-model="item.isCheck" class="SCchecked" @change="checkedChange1"></el-checkbox>
                <div>{{item.title}}：</div>
                <el-input v-model="item.start" placeholder="开始时间" @blur="blurInput(item.id)"></el-input> 
                至 <el-input v-model="item.end" placeholder="结束时间" @blur="blurInput(item.id)"></el-input>
                </div>
          </el-row>
      </div>
       <div style="text-align: right">
        <el-button type="primary" size="large" @click="screeningSub">确认</el-button>
      </div>
    </el-dialog>
    <!-- 单采机运行状况详情 弹出层-->
    <el-dialog class="DCJBox" :visible.sync="DCJDialog" :close-on-click-modal='false' :fullscreen='true' @close='closeDCJDialog'>
      <el-row class="DCJTitle"><span></span> 视频</el-row>
      <el-row :gutter="12">
        <el-col :span="8">
          <el-card>
            <div slot="header">
              <span>采浆时间视频</span>
            </div>
            <div>
             <video autoplay="autoplay" controls="controls"  :src="videoPath.videoPath1" style="width:100%;"></video>
            </div>
          </el-card>
        </el-col>
        <el-col :span="8">
          <el-card>
            <div slot="header">
              <span>采浆时间环境视频</span>
            </div>
            <div>
             <video autoplay="autoplay" controls="controls"  :src="videoPath.videoPath2" style="width:100%;"></video>
            </div>
          </el-card>
        </el-col>
        <el-col :span="8">
          <el-card>
            <div slot="header">
              <span>浆员信息</span>
            </div>
            <div class="JYInfo" v-html="JYInfo"></div>
          </el-card>
        </el-col>
      </el-row>
      <el-row class="DCJTitle" style="margin:10px 0 0 0 ;"><span></span> 运行图表</el-row>
      <div>
            <div class="echartDom" id="rotateEchart" ref="rotateEchart"></div>
            <div  class="echartDom" id="speedEchart" ref="speedEchart"></div>
            <div  class="echartDom" id="valueEchart" ref="valueEchart"></div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import analysisHttp from "plugins/axios/analysisHttp.js";
import api from "plugins/axios/api.js";
import { Loading } from 'element-ui';
// 图片引入
import bgImg from "images/yynlfxBackground.png";
import big from "images/cover_big.png";
import small from "images/cover_small.png";
import setTing from "images/cover_setTing.png";

import { setTimeout } from "timers";

let loadingInstance;
 function loadingIn(){   //开始加载
      loadingInstance = Loading.service({ fullscreen: true})
      setTimeout(() => {
        loadingInstance.close()
      },5000)
    }
    function loadingClose(){ //关闭加载
      loadingInstance.close()
    }
export default {
  data() {
    return {
      bgImg, //背景图片
      valDate: this.timestampToTime(Date.parse(new Date()), "yy-mm-dd"), //日期选择
      //时间选择
      pickerOptions: { 
        disabledDate(time) {
          return time.getTime() > Date.now();
        }
      },
      // 放大弹出层
      chartDialog:false,
      // 设置请输入间隔天数弹出层 
      intervalDay:false,
      dataList:{
        firstBlood:14,secondBlood:28,thirdBlood:42,fourthBlood:56
      },
      //筛查  弹出层
      screeningDialog:false,
      nurseData:[],//护士列表
      checkAll:false,
      checkAll1:false,
      checkedItem:[], 
      // 组合查询
      ZHQueryData:[
        {id:1,isCheck:false,title:'安装耗材时间',start:'00:50',end:'02:00',startResquest:"installTakensSmall",endResquest:'installTakensBig'},
        {id:2,isCheck:false,title:'安装耗材后空闲时间',start:'00:20',end:'01:30',startResquest:"installSpaceTakensSmall",endResquest:'installSpaceTakensBig'},
        {id:3,isCheck:false,title:'穿刺时间',start:'00:20',end:'02:30',startResquest:"punctureTakensSmall",endResquest:'punctureTakensBig'},
        {id:4,isCheck:false,title:'采浆时间第二层',start:'18:30',end:'20:30',startResquest:"collectionTakensSmall_2",endResquest:'collectionTakensBig_2'},
        {id:5,isCheck:false,title:'采浆时间第三层',start:'23:00',end:'29:00',startResquest:"collectionTakensSmall_3",endResquest:'collectionTakensBig_3'},
        {id:6,isCheck:false,title:'采浆时间第四层',start:'29:00',end:'34:00',startResquest:"collectionTakensSmall_4",endResquest:'collectionTakensBig_4'},
        {id:5,isCheck:false,title:'采浆时间第五层',start:'37:00',end:'43:30',startResquest:"collectionTakensSmall_5",endResquest:'collectionTakensBig_5'},
        {id:7,isCheck:false,title:'采浆时间第六层',start:'44:00',end:'56:00',startResquest:"collectionTakensSmall_6",endResquest:'collectionTakensBig_6'},
        {id:8,isCheck:false,title:'卸载耗材时间',start:'00:35',end:'02:15',startResquest:"uninstallTakensSmall",endResquest:'uninstallTakensBig'},
     ],
      // 单采机运行状况详情 弹出层
      DCJDialog:false,
      JYInfo:'',  // 浆员信息
      videoPath:{videoPath1:'',videoPath2:''}
    };
  },
  watch: {
    valDate() {
      let that = this;
      that.init();
    },
  },
  mounted() {
    let that = this;
    that.init();
    that.getAllNurse()
  },
  methods: {
    // 获取护士列表
    getAllNurse(){
      let that = this
      analysisHttp.getAllNurse({isCollNurse:true}).then(res => {
        if(res.statusCode == 200){
         for(let i in res.content){
           that.nurseData.push({
             name:res.content[i].name,
             id:res.content[i].id
           })
         }
        }
      })
    },
    checkedChange(){
      if(this.nurseData.length == this.checkedItem.length){
        this.checkAll = true
      }else{
        this.checkAll = false
      }
    },
    handleCheckAllChange(val){
      let that = this
      if(val){
        for(let i in that.nurseData){
          that.checkedItem.push(that.nurseData[i].id)
          this.checkAll = true
        }
      }else{
        that.checkedItem = []
        this.checkAll = false
      }
    },
    // 条件筛查
    blurInput(id){
       let that = this
      for(let i in that.ZHQueryData){
        if(that.ZHQueryData[i].id == id){
          that.ZHQueryData[i].isCheck = true
        }
      }
      that.checkedChange1(that.ZHQueryData)
    },
    checkedChange1(){
      let that = this
      let L=0
      for(let i in that.ZHQueryData){
        if(that.ZHQueryData[i].isCheck){
          ++L
        }
      }
      that.ZHQueryData.length == L ? that.checkAll1 = true : that.checkAll1 = false
    },
    handleCheckAllChange1(){
      let that = this
      let fuc = (bl) => {
         for(let i in that.ZHQueryData){
          that.ZHQueryData[i].isCheck = bl
        }
      }
      if(that.checkAll1){
       fuc(true)
      }else{
        fuc(false)
      }
   
    },
    selectDate(date) {
      //上一天、下一天
      function getTimeStamp(day) {
        let re = /(\d{4})(?:-(\d{1,2})(?:-(\d{1,2}))?)?(?:\s+(\d{1,2}):(\d{1,2}):(\d{1,2}))?/.exec(
          day
        );
        return new Date(
          re[1],
          (re[2] || 1) - 1,
          re[3] || 1,
          re[4] || 0,
          re[5] || 0,
          re[6] || 0
        ).getTime();
      }
      let that = this,
        toDate = getTimeStamp(that.valDate);
      if (date == "lastDay") {
        that.valDate = that.timestampToTime(
          toDate - 3600 * 1000 * 24,
          "yy-mm-dd"
        );
      } else if (date == "following") {
        that.valDate = that.timestampToTime(
          toDate + 3600 * 1000 * 24,
          "yy-mm-dd"
        );
      }
    },
    intervalSub(){ //弹出层间隔时间提交
      let that = this
      that.intervalDay = false
       that.getpulpingFrequency('#gradeAnalysis');
        that.getpulpingFrequency('#chartBigId');
    },
    screeningSub(){ //弹出层筛查提交
        let that = this
        that.screeningDialog = false
         that.getCollMacRunningStatus('#gantt') 
          that.getCollMacRunningStatus('#chartBigId') 
    },
    today() {
      //当天
      this.valDate = this.timestampToTime(Date.parse(new Date()), "yy-mm-dd");
    },
    init() {
      //初始化所有
      let that = this;
      that.newProviderDisplay('#newPulpLinks');
      that.getProviderHjCount('#allPulpLinks')
      that.getpulpingFrequency('#gradeAnalysis');
      that.getCollMacRunningStatus('#gantt');
    },
    newPulp(id,data) {
      //新浆员献浆（饼状图）
      let items = [];
      for (let i in data) {
        items.push({
          assayTime: data[i].assayTime,
          bodyCheckTime: data[i].bodyCheckTime,
          chestCheckTime: data[i].chestCheckTime,
          collectionTime: data[i].collectionTime,
          costTime: data[i].costTime,
          createDate: data[i].createDate,
          createTime: data[i].createTime,
          heatTime: data[i].heatTime,
          name: data[i].name,
          sampleAssayTime: data[i].sampleAssayTime
        });
      }
      let that = this;
      let names = [
        "建档",
        "体检",
        "采样",
        "胸透",
        "化检",
        "采浆",
        "费用",
        "热合"
      ];
      let list = { offer: [], data: [] };
      let creat = [],
        assay = [],
        bodyCheck = [],
        chestCheck = [],
        collection = [],
        cost = [],
        heat = [],
        sampleAssay = [];

      for (let p in items) {
        list.offer.push(items[p].name);
      }

      for (let i in items) {
        creat.push(!items[i].createTime ? "07:00" : items[i].createTime); //建档
        bodyCheck.push(
          !items[i].bodyCheckTime ? "07:00" : items[i].bodyCheckTime
        ); //体检
        sampleAssay.push(
          !items[i].sampleAssayTime ? "07:00" : items[i].sampleAssayTime
        ); //采样
        chestCheck.push(
          !items[i].chestCheckTime ? "07:00" : items[i].chestCheckTime
        ); //胸透
        assay.push(!items[i].assayTime ? "07:00" : items[i].assayTime); //化检
        collection.push(
          !items[i].collectionTime ? "07:00" : items[i].collectionTime
        ); //采浆
        cost.push(!items[i].costTime ? "07:00" : items[i].costTime); //费用
        heat.push(!items[i].heatTime ? "07:00" : items[i].heatTime); //热合
      }
      let times = [
        creat,
        bodyCheck,
        sampleAssay,
        chestCheck,
        assay,
        collection,
        cost,
        heat
      ];

      for (let t in times) {
        list.data.push({
          name: names[t],
          time: times[t]
        });
      }
      let offers = list.offer;
      let color =  [
        "#e95e48",
        "#DC951F",
        "#DDB100",
        "#DAD503",
        "#8AC867",
        "#33CC99",
        "#37B8D4",
        "#7BCFE7",
        "#6A9BD3"
      ]
      let option = {
        color: color,
        title: {
          text: "新浆员献浆过程图( 共 " + items.length + " 人 )",
          textStyle: {
            // color: "#C8E1FD",
            color: "#000000",
            fontSize: 15,
            fontFamily: "微软雅黑"
          },
          left: "10",
          top: "5"
        },
        toolbox: {
          itemSize: 22,
          feature: {
            myTool1: {
              show: true,
              title: "放大",
              icon: "image://"+big,
              onclick: function(e) {
                // let id = e.scheduler.ecInstance._dom.id
                let chId = that.chartBigId 
                that.chartDialog = true
                that.newProviderDisplay('#chartBigId');
              }
            },
            myTool2: {
              show: true,
              title: "缩小",
              icon: "image://"+small,
              onclick: function() {
                 that.chartDialog = false
              }
            }
          }
        },
        legend: {
          orient: "vertical",
          left: 0,
          top: 35,
          textStyle: {
            // color: "#FFF"
            color: "#000000"
          },
          data: (function() {
            var legends = [];
            for (var i in names) {
              legends.push({
                name: names[i],
                icon:
                  names[i] === "建档"
                    ? "triangle"
                    : names[i] === "热合"
                    ? "rect"
                    : "circle"
              });
            }
            return legends;
          })()
        },
        polar: [{ center: ["50%", "50%"] }],
        grid: {
          right: "20%",
          top: "50%",
          containLabel: true
        },
        tooltip: {
          trigger: "item",
          axisPointer: {
            type: "cross",
            label: {
              color: "rgba(0,0,0,0)",
              backgroundColor: "rgba(0,0,0,0)"
            },
            crossStyle: {
              // color: "#C8E1FD"
              color: "#000000"
            }
          },
          formatter: function(params) {
            return (
              offers[params.value[0]] +
              "<br/>" +
              (params.value[1] === "07:00" ? "时间待定" : params.value[1]) +
              "&nbsp;---&nbsp;" +
              params.seriesName
            );
          }
        },
        angleAxis: {
          type: "category",
          data: (function() {
            let time = [];
            for (var i = 1; i <= 12; i++) {
              for (var k = 0; k < 60; k++) {
                time.push(
                  (i.toString().length === 1 ? "0" + i : i) +
                    ":" +
                    (k.toString().length === 1 ? "0" + k : k)
                );
              }
            }
            return time;
          })(),
          boundaryGap: false,
          splitLine: {
            show: true,
            lineStyle: {
              // color: (function () {
              //     var colors = [];
              //     for (var i = 1; i <= 12; i++) {
              //         for (var k = 0; k < 60; k++) {
              //             colors.push((k === 0 || k === 30) ? "#FFF" : (k === 10 || k === 20 || k === 40 || k === 50) ? "#344a63" : "#173963");
              //         }
              //     }
              //     return colors;
              // }()),
              // color: "#FFF",
              color: "#000000",
              type: "slide"
            }
          },
          axisTick: {
            show: id === "newPulpLinks" ? true : false
          },
          axisLine: {
            show: true,
            lineStyle: {
              // color: "#FFF"
              color: "#000000"
            }
          },
          axisLabel: {
            show: true,
            formatter: function(params) {
              return params.substr(params.indexOf(":") + 1) === "00"
                ? params
                : "";
            }
          },
          startAngle: 60
        },
        radiusAxis: {
          type: "category",
          data: (function() {
            var radiusAxis = [];
            for (var i = 0; i < offers.length; i++) {
              radiusAxis.push(offers[i]);
            }
            return radiusAxis;
          })(),
          axisLine: {
            show: false
          },
          axisLabel: {
            rotate: 30,
            color: "rgba(0,0,0,0)"
          }
        },
        series: (function() {
          var symbol = [
              {
                size: items.length > 13 && id !== "newPulpLinks" ? 10 : 13,
                type: "triangle"
              },
              {
                size: items.length > 13 && id !== "newPulpLinks" ? 9 : 12,
                type: "circle"
              },
              {
                size: items.length > 13 && id !== "newPulpLinks" ? 9 : 12,
                type: "circle"
              },
              {
                size: items.length > 13 && id !== "newPulpLinks" ? 9 : 12,
                type: "circle"
              },
              {
                size: items.length > 13 && id !== "newPulpLinks" ? 9 : 12,
                type: "circle"
              },
              {
                size: items.length > 13 && id !== "newPulpLinks" ? 9 : 12,
                type: "circle"
              },
              {
                size: items.length > 13 && id !== "newPulpLinks" ? 9 : 12,
                type: "circle"
              },
              {
                size: items.length > 13 && id !== "newPulpLinks" ? 9 : 12,
                type: "rect"
              }
            ],
            series = [],
            datas = list.data;
          for (var i = 0, len = datas.length; i < len; i++) {
            var time = datas[i].time;
            var newTime = [];
            for (var k = 0, newTime; k < time.length; k++) {
              newTime.push({
                value: [k, time[k]],
                symbolSize: symbol[i].size,
                symbol: symbol[i].type
              });
            }
            datas[i].time = newTime;
            series.push({
              type: "scatter",
              coordinateSystem: "polar",
              symbolSize: 15,
              name: datas[i].name,
              data: datas[i].time
            });
          }
          return series;
        })()
      };

      let newPulpChart = that.$echarts.init(
        document.querySelectorAll(id)[0]
      );
      newPulpChart.clear(); //清除上次数据
      newPulpChart.setOption(option);
      window.addEventListener("resize", () => {
        newPulpChart.resize();
      });
      return option;
    },
    allPulp(id,data) {
      //浆员献浆过程图（折线图）
      let that = this;
      let items = []
      for(let i in data){
        items.push({
          afterCollection:data[i].afterCollection,
          allot:data[i].allot,
          beforeCollection:data[i].beforeCollection,
          bodyCheck:data[i].bodyCheck,
          cost:data[i].cost,
          date:data[i].date,
          heat:data[i].heat,
          register:data[i].register,
          time:data[i].time
        })
      }

      let list = ["登记", "体检", "分配", "采浆前", "采浆后", "费用", "热合"];
      let color =  [
        "#e95e48",
        "#DC951F",
        "#DDB100",
        "#DAD503",
        "#8AC867",
        "#33CC99",
        "#37B8D4",
        "#7BCFE7",
        "#6A9BD3"
      ]
      let option = {
        color: color,
        title: {
          text: "浆员献浆过程图",
          textStyle: {
            // color: "#C8E1FD",
            color: "#000",
            fontSize: 15,
            fontFamily: "微软雅黑"
          },
          left: "20",
          top: "5"
        },
        tooltip: {
          trigger: "axis",
          axisPointer: {
            type: "cross",
            label: {
              backgroundColor: "#000"
            }
          }
        },
        toolbox: {
          itemSize: 22,
          feature: {
            myTool1: {
              show: true,
              title: "放大",
              icon: "image://"+big,
              onclick: function(e) {
                that.chartDialog = true
                that.getProviderHjCount('#chartBigId')
              }
            },
            myTool2: {
              show: true,
              title: "缩小",
              icon: "image://"+small,
              onclick: function() {
                 that.chartDialog = false
              }
            }
          }
        },
        legend: {
          width: "50%",
          left: "150",
          top: 0,
          textStyle: {
            // color: "#FFF"
            color: "#000"
          },
          data: (function() {
            var data = [];
            for (var d = 0; d < list.length; d++) {
              data.push({
                name: list[d],
                icon: "circle"
              });
            }
            return data;
          })()
        },
        grid: {
          left: "2%",
          right: "4%",
          bottom: 40,
          containLabel: true
        },
        dataZoom: [
          {
            type: "slider",
            filterMode: "weakFilter",
            //start:20,
            showDataShadow: true,
            bottom: 10,
            height: 5,
            borderColor: "transparent",
            // backgroundColor: "#e2e2e2",
            backgroundColor: "#000",
            handleIcon:
              "M10.7,11.9H9.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",
            handleSize: 20,
            handleStyle: {
              shadowBlur: 6,
              shadowOffsetX: 1,
              shadowOffsetY: 2,
              shadowColor: "#aaa"
            },
            labelFormatter: ""
          },
          {
            type: "inside",
            filterMode: "weakFilter"
          }
        ],
        xAxis: {
          type: "time",
          boundaryGap: false,
          splitLine: { show: false },
          axisLine: {
            lineStyle: {
              // color: "#F9F9F9"
              color: "#000"
            }
          }
        },
        yAxis: {
          type: "value",
          splitLine: { show: false },
          axisLine: {
            lineStyle: {
              // color: "#F9F9F9"
              color: "#000"
            }
          }
        },
        series: (function() {
          var series = [],
            register = [],
            bodyCheck = [],
            allot = [],
            beforeCollection = [],
            afterCollection = [],
            heat = [],
            cost = [];
          for (var i in items) {
            register.push({
              name: items[i].time,
              value: [items[i].time, items[i].register]
            });
            bodyCheck.push({
              name: items[i].time,
              value: [items[i].time, items[i].bodyCheck]
            });
            allot.push({
              name: items[i].time,
              value: [items[i].time, items[i].allot]
            });
            beforeCollection.push({
              name: items[i].time,
              value: [items[i].time, items[i].beforeCollection]
            });
            afterCollection.push({
              name: items[i].time,
              value: [items[i].time, items[i].afterCollection]
            });
            cost.push({
              name: items[i].time,
              value: [items[i].time, items[i].cost]
            });
            heat.push({
              name: items[i].time,
              value: [items[i].time, items[i].heat]
            });
          }
          var data = [
            register,
            bodyCheck,
            allot,
            beforeCollection,
            afterCollection,
            cost,
            heat
          ];
          for (var d = 0; d < data.length; d++) {
            series.push({
              name: list[d],
              type: "line",
              showSymbol: false,
              hoverAnimation: false,
              areaStyle: { normal: {} },
              data: data[d]
            });
          }
          return series;
        })()
      };

      let allPulpChart = that.$echarts.init(
        document.querySelectorAll(id)[0]
      );
      allPulpChart.clear(); //清除上次数据
      allPulpChart.setOption(option);
      window.addEventListener("resize", () => {
        allPulpChart.resize();
      });
    },
    gradeAnalysisLink(id,lists) {
      // 生成全部浆员（饼图）图表

      let that = this;
      let leng = 1; //items.allMsg.length;
      //var lists = items.allMsg[0];
      let gradeAnalysisSend = {
        a: 14,
        b: 28,
        c: 42,
        d: 56
      };
      let data = {
        inside: [
          {
            code: "2017",
            name: "今年",
            value: leng > 0 ? lists.thisYearjd : 0
          },
          {
            code: "2016",
            name: "去年",
            value: leng > 0 ? lists.lastYearjd : 0
          },
          {
            code: "2015",
            name: "前年",
            value: leng > 0 ? lists.beforeYearjd : 0
          },
          {
            code: "-1",
            name: "其它",
            value: leng > 0 ? lists.otherYearjd : 0
          }
        ],
        outside: [
          {
            code: "2017",
            name: "今年",
            subCode: "1",
            subName:
              gradeAnalysisSend.a + "-" + (gradeAnalysisSend.b - 1) + "天",
            value: leng > 0 ? lists.freThisYear.xjBetweenDay2PCount : 0
          },
          {
            code: "2017",
            name: "今年",
            subCode: "2",
            subName:
              gradeAnalysisSend.b + "-" + (gradeAnalysisSend.c - 1) + "天",
            value: leng > 0 ? lists.freThisYear.xjBetweenDay3PCount : 0
          },
          {
            code: "2017",
            name: "今年",
            subCode: "3",
            subName:
              gradeAnalysisSend.c + "-" + (gradeAnalysisSend.d - 1) + "天",
            value: leng > 0 ? lists.freThisYear.xjBetweenDay4PCount : 0
          },
          {
            code: "2017",
            name: "今年",
            subCode: "10000",
            subName: gradeAnalysisSend.d + "天以上",
            value: leng > 0 ? lists.freThisYear.xjBetweenDay5PCount : 0
          },
          {
            code: "2016",
            name: "去年",
            subCode: "1",
            subName:
              gradeAnalysisSend.a + "-" + (gradeAnalysisSend.b - 1) + "天",
            value: leng > 0 ? lists.freLastYear.xjBetweenDay2PCount : 0
          },
          {
            code: "2016",
            name: "去年",
            subCode: "2",
            subName:
              gradeAnalysisSend.b + "-" + (gradeAnalysisSend.c - 1) + "天",
            value: leng > 0 ? lists.freLastYear.xjBetweenDay3PCount : 0
          },
          {
            code: "2016",
            name: "去年",
            subCode: "3",
            subName:
              gradeAnalysisSend.c + "-" + (gradeAnalysisSend.d - 1) + "天",
            value: leng > 0 ? lists.freLastYear.xjBetweenDay4PCount : 0
          },
          {
            code: "2016",
            name: "去年",
            subCode: "10000",
            subName: gradeAnalysisSend.d + "天以上",
            value: leng > 0 ? lists.freLastYear.xjBetweenDay5PCount : 0
          },
          {
            code: "2015",
            name: "前年",
            subCode: "1",
            subName:
              gradeAnalysisSend.a + "-" + (gradeAnalysisSend.b - 1) + "天",
            value: leng > 0 ? lists.freBeforeYear.xjBetweenDay2PCount : 0
          },
          {
            code: "2015",
            name: "前年",
            subCode: "2",
            subName:
              gradeAnalysisSend.b + "-" + (gradeAnalysisSend.c - 1) + "天",
            value: leng > 0 ? lists.freBeforeYear.xjBetweenDay3PCount : 0
          },
          {
            code: "2015",
            name: "前年",
            subCode: "3",
            subName:
              gradeAnalysisSend.c + "-" + (gradeAnalysisSend.d - 1) + "天",
            value: leng > 0 ? lists.freBeforeYear.xjBetweenDay4PCount : 0
          },
          {
            code: "2015",
            name: "前年",
            subCode: "10000",
            subName: gradeAnalysisSend.d + "天以上",
            value: leng > 0 ? lists.freBeforeYear.xjBetweenDay5PCount : 0
          },
          {
            code: "-1",
            name: "其它",
            subCode: "1",
            subName:
              gradeAnalysisSend.a + "-" + (gradeAnalysisSend.b - 1) + "天",
            value: leng > 0 ? lists.freOtherYear.xjBetweenDay2PCount : 0
          },
          {
            code: "-1",
            name: "其它",
            subCode: "2",
            subName:
              gradeAnalysisSend.b + "-" + (gradeAnalysisSend.c - 1) + "天",
            value: leng > 0 ? lists.freOtherYear.xjBetweenDay3PCount : 0
          },
          {
            code: "-1",
            name: "其它",
            subCode: "3",
            subName:
              gradeAnalysisSend.c + "-" + (gradeAnalysisSend.d - 1) + "天",
            value: leng > 0 ? lists.freOtherYear.xjBetweenDay4PCount : 0
          },
          {
            code: "-1",
            name: "其它",
            subCode: "10000",
            subName: gradeAnalysisSend.d + "天以上",
            value: leng > 0 ? lists.freOtherYear.xjBetweenDay5PCount : 0
          }
        ]
      };

      let newArr = [];
      for (var i = 0; i < data.inside.length; i++) {
        newArr.push({
          name: data.inside[i].name,
          icon: "circle"
        });
      }
      var option = {
        color: ["#ED0F08", "#ED8608", "#12D3EA", "#3179A7"],
        title: {
          text:
            "浆员浆龄与离上次献浆间隔" +
            "( 共" +
            (lists.thisYearjd +
              lists.lastYearjd +
              lists.beforeYearjd +
              lists.otherYearjd) +
            " 人 )",
          textStyle: {
            // color: "#C8E1FD",
            color: "#000",
            fontSize: 15,
            fontFamily: "微软雅黑"
          },
          left: "10",
          top: "5"
        },
        tooltip: {
          trigger: "item",
          formatter: function(params) {
            var html =
              params.name +
              "<br/>" +
              (typeof params.data.subName === "undefined"
                ? ""
                : params.data.subName + "： ") +
              params.value +
              "&nbsp;-->&nbsp;" +
              '<span style="color: yellow"> ' +
              params.percent +
              "%" +
              "</span>";
            return html;
          }
        },
        toolbox: {
          itemSize: 22,
          feature: {
            myTool1: {
              show: true,
              title: "放大",
              icon: "image://"+big,
              onclick: function(e) {
                that.chartDialog = true
                that.getpulpingFrequency('#chartBigId')
              }
            },
            myTool2: {
              show: true,
              title: "缩小",
              icon: "image://"+small,
              onclick: function() {
                 that.chartDialog = false
              }
            },
            myTool3: {
              show: true,
              title: "配置",
              icon: "image://"+setTing,
              onclick: function(e) {
                  that.intervalDay = true
              }
            }
          }
        },
        legend: {
          orient: "vertical",
          left: "20",
          top: "100",
          textStyle: {
            // color: "#FFF"
            color: "#000"
          },
          data: newArr,
          formatter: function(name) {
            if (name === "今年") {
              return name + "  " + (leng > 0 ? lists.thisYearjd : 0) + "人";
            } else if (name === "去年") {
              return name + "  " + (leng > 0 ? lists.lastYearjd : 0) + "人";
            } else if (name === "前年") {
              return name + "  " + (leng > 0 ? lists.beforeYearjd : 0) + "人";
            } else {
              return "其他" + "  " + (leng > 0 ? lists.otherYearjd : 0) + "人";
            }
          }
        },
        series: [
          {
            name: "浆员浆龄",
            type: "pie",
            radius: [0, "50%"],
            center: ["60%", "53%"],
            label: {
              normal: {
                position: "inner",
                formatter: function(params) {
                  return params.data.value == 0 ? "" : params.name;
                }
              }
            },
            data: data.inside
          },
          {
            name: "献浆间隔",
            type: "pie",
            radius: ["60%", "80%"],
            center: ["60%", "53%"],

            label: {
              normal: {
                position: "inner",
                formatter: function(params) {
                  return params.data.value == 0
                    ? ""
                    : params.data.subCode === "10000"
                    ? 4
                    : params.data.subCode;
                }
              }
            },
            data: (function() {
              var datas = [];
              for (var i in data.outside) {
                var item = data.outside[i];
                datas.push({
                  name: item.name,
                  value: item.value,
                  subName: item.subName,
                  subCode: item.subCode,
                  itemStyle: {
                    normal: {
                      color:
                        item.subCode === "1" && item.name === "今年"
                          ? "#DB1C15"
                          : item.subCode === "2" && item.name === "今年"
                          ? "#CB241F"
                          : item.subCode === "3" && item.name === "今年"
                          ? "#B92E29"
                          : item.subCode === "10000" && item.name === "今年"
                          ? "#A73431"
                          : item.subCode === "1" && item.name === "其它"
                          ? "#2088CE"
                          : item.subCode === "2" && item.name === "其它"
                          ? "#2292DD"
                          : item.subCode === "3" && item.name === "其它"
                          ? "#3199DF"
                          : item.subCode === "10000" && item.name === "其它"
                          ? "#3FA1E2"
                          : item.subCode === "1" && item.name === "前年"
                          ? "#24ADBC"
                          : item.subCode === "2" && item.name === "前年"
                          ? "#2998A5"
                          : item.subCode === "3" && item.name === "前年"
                          ? "#2C7E89"
                          : item.subCode === "10000" && item.name === "前年"
                          ? "#2E6A71"
                          : item.subCode === "1" && item.name === "去年"
                          ? "#D37E15"
                          : item.subCode === "2" && item.name === "去年"
                          ? "#B7711C"
                          : item.subCode === "3" && item.name === "去年"
                          ? "#A56A21"
                          : item.subCode === "10000" && item.name === "去年"
                          ? "#8E5F27"
                          : "#5A5A5A"
                    }
                  }
                });
              }
              return datas;
            })()
          }
        ]
      };

      let gradeAChart = that.$echarts.init(
        document.querySelectorAll(id)[0]
      );
      gradeAChart.clear(); //清除上次数据
      gradeAChart.setOption(option);
      window.addEventListener("resize", () => {
        gradeAChart.resize();
      });
    },
    ganttLink(id,data) {
      // 生成采浆机运行（甘特图）图表
      // console.log(data)
      let items = {
        collection: [],
        install: [],
        installAfter: [],
        puncture: [],
        puncture: [],
        space: [],
        unInstall: []
      };
      let that = this;
      for (let i in data) {
        items.collection.push({
          id: data[i].id,
          cardId: data[i].cardId,
          collectionCycles: data[i].collectionCycles,
          collectionEndTime: data[i].collectionEndTime,
          collectionStartTime: data[i].collectionStartTime,
          collectionTakens: data[i].collectionTakensDesc,
          machineNo: data[i].macNum,
          nurse: data[i].nurseName,
          providerName: data[i].providerName,
          mlogId:data[i].mlogId
        });
        items.install.push({
          id: data[i].id,
          cardId: data[i].cardId,
          installEndTime: data[i].installEndTime,
          installStartTime: data[i].installStartTime,
          installTakens: data[i].installTakensDesc,
          machineNo: data[i].macNum,
          nurse: data[i].nurseName,
          providerName: data[i].providerName,
           mlogId:data[i].mlogId
        });
        items.installAfter.push({
          id: data[i].id,
          cardId: data[i].cardId,
          installSpaceEndTime: data[i].installSpaceEndTime,
          installSpaceStartTime: data[i].installSpaceStartTime,
          installSpaceTakens: data[i].installSpaceTakensDesc,
          machineNo: data[i].macNum,
          nurse: data[i].nurseName,
          providerName: data[i].providerName,
           mlogId:data[i].mlogId
        });
        items.puncture.push({
          id: data[i].id,
          cardId: data[i].cardId,
          machineNo: data[i].macNum,
          nurse: data[i].nurseName,
          providerName: data[i].providerName,
          punctureEndTime: data[i].punctureEndTime,
          punctureStartTime: data[i].punctureStartTime,
          punctureTakens: data[i].punctureTakensDesc,
           mlogId:data[i].mlogId
        });
        items.space.push({
          id: data[i].id,
          cardId: data[i].cardId,
          machineNo: data[i].macNum,
          nurse: data[i].nurseName,
          providerName: data[i].providerName,
          spaceEndTime: data[i].spaceEndTime,
          spaceSequence: data[i].spaceSequence,
          spaceStartTime: data[i].spaceStartTime,
          spaceTakens: data[i].spaceTakensDesc,
           mlogId:data[i].mlogId
        });
        items.unInstall.push({
          id: data[i].id,
          cardId: data[i].cardId,
          machineNo: data[i].macNum,
          nurse: data[i].nurseName,
          providerName: data[i].providerName,
          uninstallEndTime: data[i].uninstallEndTime,
          uninstallStartTime: data[i].uninstallStartTime,
          uninstallTakens: data[i].uninstallTakensDesc,
           mlogId:data[i].mlogId
        });
      }
     
      window.openWorkingCharts = (...values) => {
        //点击弹框
        let mlogId
        for(let i in items.unInstall){
          if(values[4] == items.unInstall[i].cardId){
           mlogId = items.unInstall[i].mlogId
          }
        }
        that.videoPath.videoPath1 = 'http://192.168.0.145:9999/adscm/application/providerCollVideo/getCollVideoByLogId?videoType=1&&logId='+mlogId;
        that.videoPath.videoPath2 = 'http://192.168.0.145:9999/adscm/application/providerCollVideo/getCollVideoByLogId?videoType=2&&logId='+mlogId;
        that.DCJDialog = true
        that.getPriodic(mlogId)
      };
      let configGantChartData = {
        installTakensSmall: items.installStartTime
          ? items.installStartTime
          : "",
        installTakensBig: items.installEndTime ? items.installEndTime : "",
        installSpaceTakensSmall: items.installSpaceStartTime
          ? items.installSpaceStartTime
          : "",
        installSpaceTakensBig: items.installSpaceEndTime
          ? items.installSpaceEndTime
          : "",
        punctureTakensSmall: items.punctureStartTime
          ? items.punctureStartTime
          : "",
        punctureTakensBig: items.punctureEndTime ? items.punctureEndTime : "",
        collectionTakens: {
          two: {
            collectionTakensSmall: items.secondCollectionStartTime
              ? items.secondCollectionStartTime
              : "",
            collectionTakensBig: items.secondCollectionEndTime
              ? items.secondCollectionEndTime
              : ""
          },
          three: {
            collectionTakensSmall: items.thirdCollectionStartTime
              ? items.thirdCollectionStartTime
              : "",
            collectionTakensBig: items.thirdCollectionEndTime
              ? items.thirdCollectionEndTime
              : ""
          },
          four: {
            collectionTakensSmall: items.fourthCollectionStartTime
              ? items.fourthCollectionStartTime
              : "",
            collectionTakensBig: items.fourthCollectionEndTime
              ? items.fourthCollectionEndTime
              : ""
          },
          five: {
            collectionTakensSmall: items.fifthCollectionStartTime
              ? items.fifthCollectionStartTime
              : "",
            collectionTakensBig: items.fifthCollectionEndTime
              ? items.fifthCollectionEndTime
              : ""
          },
          six: {
            collectionTakensSmall: items.sixthCollectionStartTime
              ? items.sixthCollectionStartTime
              : "",
            collectionTakensBig: items.sixthCollectionEndTime
              ? items.sixthCollectionEndTime
              : ""
          }
        },
        uninstallTakensSmall: items.uninstallStartTime
          ? items.uninstallStartTime
          : "",
        uninstallTakensBig: items.uninstallEndTime ? items.uninstallEndTime : ""
      };
      
      let legendSelect = function() { //筛查联动
        let legendSelect = {
          安装耗材时间: false,
          安装耗材后空闲时间: false,
          穿刺时间: false,
          采浆时间: false,
          卸载耗材时间: false,
          空闲时间: true
        };
        let o=0
        for(let i in that.ZHQueryData){
          let title = that.ZHQueryData[i].title
          if(that.ZHQueryData[i].isCheck){
            for(let j in legendSelect){
              if(j == that.ZHQueryData[i].title || that.ZHQueryData[i].title.search(j) !=-1){
                  legendSelect[j] = true 
              }
            }
          }else if(!that.ZHQueryData[i].isCheck){
            if(o == 8){
              legendSelect = {安装耗材时间: true,安装耗材后空闲时间: true, 穿刺时间: true,采浆时间: true,卸载耗材时间: true,空闲时间: true
              };
            } 
            o++
          }
        }
        return legendSelect
      }
      let gantChartData = {
        nurseListID: nurseListID,
        installTakensSmall: "",
        installTakensBig: "",
        installSpaceTakensSmall: "",
        installSpaceTakensBig: "",
        punctureTakensSmall: "",
        punctureTakensBig: "",
        collectionTakens: {
          two: {
            collectionTakensSmall: "",
            collectionTakensBig: ""
          },
          three: {
            collectionTakensSmall: "",
            collectionTakensBig: ""
          },
          four: {
            collectionTakensSmall: "",
            collectionTakensBig: ""
          },
          five: {
            collectionTakensSmall: "",
            collectionTakensBig: ""
          },
          six: {
            collectionTakensSmall: "",
            collectionTakensBig: ""
          }
        },
        uninstallTakensSmall: "",
        uninstallTakensBig: ""
      };
      function getSubText(name, small, big) {
        //获取副标题
        if (small !== "" && big !== "") {
          return " -- " + name + "【" + small + "之下," + big + "之上】";
        } else if (small !== "" && big === "") {
          return " -- " + name + "【" + small + "之下】";
        } else if (small === "" && big !== "") {
          return " -- " + name + "【" + big + "之上】";
        } else {
          return "";
        }
      }
      function SCCheck(){ 
        let _a;
        _a = ''
        for(let i in that.ZHQueryData){
          if(that.ZHQueryData[i].isCheck){
            _a = _a+ getSubText(that.ZHQueryData[i].title, that.ZHQueryData[i].start, that.ZHQueryData[i].end)
          }
        }
        return _a
      }
      function unique(Array) {
        let res = [];
        let json = {};
        for (let i = 0; i < Array.length; i++) {
          if (!json[Array[i]]) {
            res.push(Array[i]);
            json[Array[i]] = 1;
          }
        }
        return res;
      }
      let nowNurseList = [];
      let nurseListID = [];
      for (let n = 0; n < items.install.length; n++) {
        nowNurseList.push(items.install[n].nurse);
      }
      nurseListID = unique(nowNurseList);
      let names = [
          "安装耗材时间",
          "安装耗材后空闲时间",
          "穿刺时间",
          "采浆时间",
          "卸载耗材时间",
          "空闲时间"
        ],
        categories = [
          "001",
          "002",
          "003",
          "004",
          "005",
          "006",
          "007",
          "008",
          "009",
          "010",
          "011",
          "012",
          "013",
          "014",
          "015",
          "016",
          "017",
          "018",
          "019",
          "020"
        ];
      let azhc1 = gantChartData.installTakensSmall;
      let azhc2 = gantChartData.installTakensBig;
      let azhcSpace1 = gantChartData.installSpaceTakensSmall;
      let azhcSpace2 = gantChartData.installSpaceTakensBig;
      let puncture1 = gantChartData.punctureTakensSmall;
      let puncture2 = gantChartData.punctureTakensBig;
      let collect2_1 =
        gantChartData.collectionTakens !== ""
          ? gantChartData.collectionTakens.two.collectionTakensSmall
          : "";
      let collect2_2 =
        gantChartData.collectionTakens !== ""
          ? gantChartData.collectionTakens.two.collectionTakensBig
          : "";
      let collect3_1 =
        gantChartData.collectionTakens !== ""
          ? gantChartData.collectionTakens.three.collectionTakensSmall
          : "";
      let collect3_2 =
        gantChartData.collectionTakens !== ""
          ? gantChartData.collectionTakens.three.collectionTakensBig
          : "";
      let collect4_1 =
        gantChartData.collectionTakens !== ""
          ? gantChartData.collectionTakens.four.collectionTakensSmall
          : "";
      let collect4_2 =
        gantChartData.collectionTakens !== ""
          ? gantChartData.collectionTakens.four.collectionTakensBig
          : "";
      let collect5_1 =
        gantChartData.collectionTakens !== ""
          ? gantChartData.collectionTakens.five.collectionTakensSmall
          : "";
      let collect5_2 =
        gantChartData.collectionTakens !== ""
          ? gantChartData.collectionTakens.five.collectionTakensBig
          : "";
      let collect6_1 =
        gantChartData.collectionTakens !== ""
          ? gantChartData.collectionTakens.six.collectionTakensSmall
          : "";
      let collect6_2 =
        gantChartData.collectionTakens !== ""
          ? gantChartData.collectionTakens.six.collectionTakensBig
          : "";
      let xzhc1 = gantChartData.uninstallTakensSmall;
      let xzhc2 = gantChartData.uninstallTakensBig;
      let option = {
        color: [
          "#e95e48",
          "#DC951F",
          "#DDB100",
          "#DAD503",
          "#8AC867",
          "#37B8D4",
          "#7BCFE7",
          "#6A9BD3"
        ],
        title: {
          text: "当天单采机运行状况",
          subtext:
            "标准指标" +SCCheck(),
          subtextStyle: {
            // color: "#97afcb",
            color: "#000",
            fontSize: 12,
            fontFamily: "微软雅黑"
          },
          textStyle: {
            // color: "#C8E1FD",
            color: "#000",
            fontSize: 15,
            fontFamily: "微软雅黑"
          },
          left: "10",
          top: "5"
        },
        tooltip: {
          backgroundColor: "#F6F6F6",
          borderWidth: 1,
          borderColor: "rgba(0,0,0,.3)",
          triggerOn: "click",
          confine: true,
          enterable: true,
          transitionDuration: 0,
          textStyle: {
            // color: "#333"
            color: "#000"
          },
          extraCssText: "box-shadow: 0 0 5px 1px rgba(255, 255, 255, 0.3);",
          padding: [5, 10],
          position: function(pos, params, dom, rect, size) {
            return [pos[0] + 10, pos[1]];
          },
          formatter: function(params) {
            let matter;
            let date = params.value[1].substr(0, 10),
              machine = params.value[0],
              name = params.data.name,
              pulpName = params.value[4],
              cardId = params.value[5],
              nurse = params.value[6],
              startT = params.value[1].substr(11, 8),
              endT = params.value[2].substr(11, 8),
              times = params.value[3],
              spaceId = name === "空闲时间" ? params.value[7] : "",
              layers = name === "采浆时间" ? params.value[7] : "",
              fewLayers,
              fewOther,
              longTime,
              startLongT,
              endLongT,
              isOverTime = true,
              overTime
            if (name === "安装耗材时间") {
              fewOther =
                configGantChartData.installTakensSmall +
                " -- " +
                configGantChartData.installTakensBig;
              startLongT = parseFloat(
                configGantChartData.installTakensSmall.replace(":", ".")
              );
              endLongT = parseFloat(
                configGantChartData.installTakensBig.replace(":", ".")
              );
            } else if (name === "安装耗材后空闲时间") {
              fewOther =
                configGantChartData.installSpaceTakensSmall +
                " -- " +
                configGantChartData.installSpaceTakensBig;
              startLongT = parseFloat(
                configGantChartData.installSpaceTakensSmall.replace(":", ".")
              );
              endLongT = parseFloat(
                configGantChartData.installSpaceTakensBig.replace(":", ".")
              );
            } else if (name === "穿刺时间") {
              fewOther =
                configGantChartData.punctureTakensSmall +
                " -- " +
                configGantChartData.punctureTakensBig;
              startLongT = parseFloat(
                configGantChartData.punctureTakensSmall.replace(":", ".")
              );
              endLongT = parseFloat(
                configGantChartData.punctureTakensBig.replace(":", ".")
              );
            } else if (name === "卸载耗材时间") {
              fewOther =
                configGantChartData.uninstallTakensSmall +
                " -- " +
                configGantChartData.uninstallTakensBig;
              startLongT = parseFloat(
                configGantChartData.uninstallTakensSmall.replace(":", ".")
              );
              endLongT = parseFloat(
                configGantChartData.uninstallTakensBig.replace(":", ".")
              );
            } else if (name === "采浆时间") {
              if (layers === "2") {
                fewLayers =
                  configGantChartData.collectionTakens.two
                    .collectionTakensSmall +
                  " -- " +
                  configGantChartData.collectionTakens.two.collectionTakensBig;
                startLongT = parseFloat(
                  configGantChartData.collectionTakens.two.collectionTakensSmall.replace(
                    ":",
                    "."
                  )
                );
                endLongT = parseFloat(
                  configGantChartData.collectionTakens.two.collectionTakensBig.replace(
                    ":",
                    "."
                  )
                );
              } else if (layers === "3") {
                fewLayers =
                  configGantChartData.collectionTakens.three
                    .collectionTakensSmall +
                  " -- " +
                  configGantChartData.collectionTakens.three
                    .collectionTakensBig;
                startLongT = parseFloat(
                  configGantChartData.collectionTakens.three.collectionTakensSmall.replace(
                    ":",
                    "."
                  )
                );
                endLongT = parseFloat(
                  configGantChartData.collectionTakens.three.collectionTakensBig.replace(
                    ":",
                    "."
                  )
                );
              } else if (layers === "4") {
                fewLayers =
                  configGantChartData.collectionTakens.four
                    .collectionTakensSmall +
                  " -- " +
                  configGantChartData.collectionTakens.four.collectionTakensBig;
                startLongT = parseFloat(
                  configGantChartData.collectionTakens.four.collectionTakensSmall.replace(
                    ":",
                    "."
                  )
                );
                endLongT = parseFloat(
                  configGantChartData.collectionTakens.four.collectionTakensBig.replace(
                    ":",
                    "."
                  )
                );
              } else if (layers === "5") {
                fewLayers =
                  configGantChartData.collectionTakens.five
                    .collectionTakensSmall +
                  " -- " +
                  configGantChartData.collectionTakens.five.collectionTakensBig;
                startLongT = parseFloat(
                  configGantChartData.collectionTakens.five.collectionTakensSmall.replace(
                    ":",
                    "."
                  )
                );
                endLongT = parseFloat(
                  configGantChartData.collectionTakens.five.collectionTakensBig.replace(
                    ":",
                    "."
                  )
                );
              } else if (layers === "6") {
                fewLayers =
                  configGantChartData.collectionTakens.six
                    .collectionTakensSmall +
                  " -- " +
                  configGantChartData.collectionTakens.six.collectionTakensBig;
                startLongT = parseFloat(
                  configGantChartData.collectionTakens.six.collectionTakensSmall.replace(
                    ":",
                    "."
                  )
                );
                endLongT = parseFloat(
                  configGantChartData.collectionTakens.six.collectionTakensBig.replace(
                    ":",
                    "."
                  )
                );
              } else {
                fewLayers = "不达标";
                startLongT = parseFloat(
                  configGantChartData.collectionTakens.two.collectionTakensSmall.replace(
                    ":",
                    "."
                  )
                );
                endLongT = parseFloat(
                  configGantChartData.collectionTakens.six.collectionTakensBig.replace(
                    ":",
                    "."
                  )
                );
              }
            }
            if (times.indexOf("分") >= 0 && times.indexOf("秒") >= 0) {
              longTime = parseFloat(times.replace("分", ".").replace("秒", ""));
            } else if (times.indexOf("分") >= 0 && times.indexOf("秒") < 0) {
              longTime = parseFloat(times.replace("分", "") + ".60");
            } else if (times.indexOf("分") < 0 && times.indexOf("秒") >= 0) {
              longTime = parseFloat("0." + times.replace("秒", ""));
            }
            if (longTime - startLongT < 0 || longTime - endLongT > 0) {
              isOverTime = false;
              if (longTime - startLongT < 0) {
                overTime = (longTime - startLongT).toFixed(2);
              } else if (longTime - endLongT > 0) {
                overTime = (longTime - endLongT).toFixed(2);
              }
              overTime = overTime.replace(".", "分") + "秒";
            }
            matter =
              "<div>"+name+"："+
              '<a href="javascript:void(0);" style="float: right;" onclick="openWorkingCharts(\'' +
              date +
              "','" +
              machine +
              "','" +
              name +
              "','" +
              pulpName +
              "','" +
              cardId +
              "','" +
              nurse +
              "','" +
              startT +
              "','" +
              endT +
              "','" +
              times +
              "','" +
              spaceId +
              "','" +
              layers +
              "','" +
              fewLayers +
              "','" +
              fewOther +
              "','" +
              isOverTime +
              "','" +
              overTime +
              "','"+
              "')\">查看详情</a></div>" +
              "<div><em>采浆机编号：</em><span>"+machine +"</span></div>"+  
              (name === "空闲时间" ? "" : "<div><em>浆员：</em><span>"+pulpName+"</span></div>") +
              (name === "空闲时间" ? "" : "<div><em>卡号：</em><span>"+cardId+"</span></div>") +
              (name === "空闲时间" ? "" : "<div><em>操作护士：</em><span>"+nurse+"</span></div>") +
              (name === "采浆时间" ? "<div><em>采浆层数：</em><span>"+layers+"</span></div>" : "") +
              (name === "采浆时间" ? "<div><em>采浆第"+layers+"层标准时间：</em><span>"+fewLayers+"</span></div>": "") +
              (name !== "采浆时间" && name !== "空闲时间" ? "<div><em>"+ name.replace("时间", "") + "标准时间：" + "</em><span>"+fewOther+"</span></div>" : "") +
              (name !== "空闲时间" && !isOverTime ? "<div style='color: red;><em>超时：</em><span>"+overTime+"</span></div>": "") +
              "<div><em>时间段：</em><span>"+startT+"至"+endT+"</span></div>"+
              "<div><em>时长：</em><span>"+times+"</span></div>";
              that.JYInfo=matter
            return matter;
          }
        },
        legend: [
          {
            left: "20%",
            textStyle: {
              // color: "#FFF"
              color: "#000"
            },
            selected: legendSelect(),
            data: (function() {
              var newData = [];
              for (var i = 0; i < names.length; i++) {
                newData.push({
                  name: names[i],
                  icon: "circle"
                });
              }
              return newData;
            })()
          }
        ],
        toolbox: {
          itemSize: 22,
          feature: {
             myTool1: {
              show: true,
              title: "放大",
              icon: "image://"+big,
              onclick: function(e) {
                that.chartDialog = true
                that.getCollMacRunningStatus('#chartBigId')
              }
            },
            myTool2: {
              show: true,
              title: "缩小",
              icon: "image://"+small,
              onclick: function() {
                 that.chartDialog = false
              }
            },
             myTool3: {
              show: true,
              title: "筛查",
              icon: "image://"+setTing,
              onclick: function(e) {
                  that.screeningDialog = true
              }
            }
          }
        },
        grid: {
          left: 30,
          right: 20
        },
        dataZoom: [
          {
            type: "slider",
            filterMode: "weakFilter",
            showDataShadow: true,
            bottom: 10,
            height: 5,
            borderColor: "transparent",
            backgroundColor: "#e2e2e2",
            handleIcon:
              "M10.7,11.9H9.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",
            handleSize: 20,
            handleStyle: {
              shadowBlur: 6,
              shadowOffsetX: 1,
              shadowOffsetY: 2,
              shadowColor: "#aaa"
            },
            labelFormatter: ""
          },
          {
            type: "inside",
            filterMode: "weakFilter"
          }
        ],
        xAxis: {
          type: "time",
          splitNumber: 30,
          splitLine: {
            show: false
          },
          axisLine: {
            lineStyle: {
              // color: "#F9F9F9"
              color: "#000"
            }
          }
        },
        yAxis: {
          data: categories,
          axisLine: {
            lineStyle: {
              // color: "#F9F9F9"
              color: "#000"
            }
          }
        },
        series: (function() {
          var datas = [],
            series = [];

          for (var i = 0; i < items.install.length; i++) {
            var installA = items.install[i];
            datas.push({
              name: names[0],
              value: [
                installA.machineNo,
                installA.installStartTime,
                installA.installEndTime,
                installA.installTakens,
                installA.providerName,
                installA.cardId,
                installA.nurse
              ]
            });
          }

          for (var ia = 0; ia < items.installAfter.length; ia++) {
            var installAA = items.installAfter[ia];
            datas.push({
              name: names[1],
              value: [
                installAA.machineNo,
                installAA.installSpaceStartTime,
                installAA.installSpaceEndTime,
                installAA.installSpaceTakens,
                installAA.providerName,
                installAA.cardId,
                installAA.nurse
              ]
            });
          }

          for (var p = 0; p < items.puncture.length; p++) {
            var punctureA = items.puncture[p];
            datas.push({
              name: names[2],
              value: [
                punctureA.machineNo,
                punctureA.punctureStartTime,
                punctureA.punctureEndTime,
                punctureA.punctureTakens,
                punctureA.providerName,
                punctureA.cardId,
                punctureA.nurse
              ]
            });
          }

          for (var c = 0; c < items.collection.length; c++) {
            var collectionA = items.collection[c];
            datas.push({
              name: names[3],
              value: [
                collectionA.machineNo,
                collectionA.collectionStartTime,
                collectionA.collectionEndTime,
                collectionA.collectionTakens,
                collectionA.providerName,
                collectionA.cardId,
                collectionA.nurse,
                collectionA.collectionCycles
              ]
            });
          }

          for (var u = 0; u < items.unInstall.length; u++) {
            var unInstallA = items.unInstall[u];
            datas.push({
              name: names[4],
              value: [
                unInstallA.machineNo,
                unInstallA.uninstallStartTime,
                unInstallA.uninstallEndTime,
                unInstallA.uninstallTakens,
                unInstallA.providerName,
                unInstallA.cardId,
                unInstallA.nurse
              ]
            });
          }

          for (var s = 0; s < items.space.length; s++) {
            var spaceA = items.space[s];
            datas.push({
              name: names[5],
              value: [
                spaceA.machineNo,
                spaceA.spaceStartTime ? spaceA.spaceStartTime : "",
                spaceA.spaceEndTime ? spaceA.spaceEndTime : "",
                spaceA.spaceTakens ? spaceA.spaceTakens : "",
                spaceA.providerName,
                spaceA.cardId,
                spaceA.nurse,
                spaceA.spaceSequence ? spaceA.spaceSequence : ""
              ]
            });
          }

          for (var k = 0; k < datas.length; k++) {
            var item = datas[k];
            series.push({
              name: item.name,
              type: "custom",
              encode: {
                x: [1, 2],
                y: 0
              },
              renderItem: function(params, api) {
                var categoryIndex = api.value(0);
                var start = api.coord([api.value(1), categoryIndex]);
                var end = api.coord([api.value(2), categoryIndex]);
                return {
                  type: "rect",
                  shape: that.$echarts.graphic.clipRectByRect(
                    {
                      x: start[0],
                      y: start[1] - 2,
                      width: end[0] - start[0],
                      height: 10
                    },
                    {
                      x: params.coordSys.x,
                      y: params.coordSys.y,
                      width: params.coordSys.width,
                      height: params.coordSys.height
                    }
                  ),
                  style: api.style()
                };
              },
              itemStyle: {
                normal: {
                  opacity: 0.8
                }
              },
              data: [
                {
                  name: item.name,
                  value: item.value
                }
              ]
            });
          }
          return series;
        })()
      };

      let ganttChart = that.$echarts.init(
        document.querySelectorAll(id)[0]
      );

      ganttChart.on("legendselectchanged", function(params) {
        legendSelect = params.selected;
      });
      ganttChart.clear(); //清除上次数据
      ganttChart.setOption(option);
      window.addEventListener("resize", () => {
        ganttChart.resize();
      });
    },
    // 详情弹框 图表联动
     getPriodic(mlogId){
                let self=this;
                api.priodic({mlogId}).then(res=>{
                    let timeData=[],
                    curXbDrawRotated=[],/**血泵采集圈数 */
                    curXbReturnRotated=[],/**血泵还输圈数 */
                    knjRotated=[],/**抗凝剂泵圈数 */
                    xbRotated=[],/**血泵圈数 */

                    knjSpeed=[],/**抗凝剂泵速度 */
                    lxjSpeed=[],/**离心机转速 */
                    xbSpeed=[],/** 血泵速度*/

                    gyValue=[],/**管压值 */
                    htValue=[],/**红探值 */
                    xyValue=[],/**袖带压力 */

                    knjdzcWeight=[],/** 抗凝剂电子称重量*/
                    xjdzcWeight=[],/**血浆电子称重量 */

                    knjb=[];/** 抗凝剂全血比*/
                    let rotatedMax=res.content[0].curXbDrawRotated,
                    rotatedMin=res.content[0].curXbDrawRotated,
                    speedMax=res.content[0].knjSpeed,
                    speedMin=res.content[0].knjSpeed,
                    valueMax=res.content[0].gyValue,
                    valueMin=res.content[0].gyValue,
                    weightMax =res.content[0].knjdzcWeight,
                    weightMin =res.content[0].knjdzcWeight,
                    htMax=res.content[0].htValue,
                    htMin=res.content[0].htValue,
                    knjbMax=res.content[0].knjb,
                    knjbMin=res.content[0].knjb;
                    res.content.forEach(el=> {
                        let time=el.time.split(' ')
                        timeData.push(time[1]);
                        curXbDrawRotated.push(el.curXbDrawRotated);
                        curXbReturnRotated.push(el.curXbReturnRotated);
                        knjRotated.push(el.knjRotated);
                        xbRotated.push(el.xbRotated);
                        rotatedMax =Math.max(rotatedMax,el.curXbDrawRotated,el.curXbReturnRotated,el.knjRotated,el.xbRotated);
                        rotatedMin=Math.min(rotatedMin,el.curXbDrawRotated,el.curXbReturnRotated,el.knjRotated,el.xbRotated);

                        knjSpeed.push(el.knjSpeed);
                        lxjSpeed.push(el.lxjSpeed);
                        xbSpeed.push(el.xbSpeed);
                        speedMax=Math.max(speedMax,el.knjSpeed,el.lxjSpeed,el.xbSpeed);
                        speedMin=Math.min(speedMin,el.knjSpeed,el.lxjSpeed,el.xbSpeed);

                        gyValue.push(el.gyValue);
                        htValue.push(el.htValue);
                        xyValue.push(el.xyValue);
                        valueMax=Math.max(valueMax,el.gyValue,el.htValue,el.xyValue);
                        valueMin=Math.min(valueMin,el.gyValue,el.htValue,el.xyValue);
                        htMax=Math.max(htMax,el.htValue);
                        htMin=Math.max(htMin,el.htValue);

                        knjdzcWeight.push(el.knjdzcWeight);
                        xjdzcWeight.push(el.xjdzcWeight);
                        weightMax =Math.max(weightMax,el.knjdzcWeight,el.xjdzcWeight);
                        weightMin =Math.min(weightMin,el.knjdzcWeight,el.xjdzcWeight);

                        knjb.push(el.knjb);
                        knjbMax=Math.max(knjbMax,el.knjb);
                        knjbMin=Math.min(knjbMin,el.knjb);
                    });
                    let  myChart1= self.$echarts.init(self.$refs.rotateEchart),
                    myChart2=self.$echarts.init(self.$refs.speedEchart),
                    myChart3=self.$echarts.init(self.$refs.valueEchart);
                    let option1={
                        legend: {
                            data:['血泵采集圈数','血泵还输圈数','抗凝剂泵圈数','血泵圈数','抗凝剂全血比']
                        },
                         tooltip: {
                            trigger: 'axis',
                            position: function (pt) {
                                return [pt[0], '10%'];
                            }
                         },
                        xAxis: {
                            type: 'category',
                            data:timeData
                        },
                        dataZoom:{},
                        axisPointer: {
                            link: {xAxisIndex: 'all'}
                        },
                        yAxis: [{
                            type: 'value',
                            name:'圈数',
                            position:'left',
                            max:rotatedMax,
                            min:function(val){
                                if(rotatedMin > 0){
                                    return 0;
                                }else{

                                    return rotatedMin;
                                }
                            },
                            splitNumber:6
                        },{
                            type: 'value',
                            name:'比列',
                            max:knjbMax,
                            min:function(val){
                                if(knjbMin > 0){
                                    return 0;
                                }else{

                                    return knjbMin;
                                }
                            },
                            position:'right',
                            splitNumber:6
                        }],
                        series: [{
                            name:"血泵采集圈数",
                            data: curXbDrawRotated,
                            symbol:'circle',
                            symbolSize :4,
                            showAllSymbol:false,
                            itemStyle:{
                                color:'#ee3e6f'
                            },
                            lineStyle:{
                                color:"#ee3e6f",
                                width:1
                            },
                            areaStyle:{},
                            label:{
                                show:true
                            },
                            type: 'line'
                        },
                        {
                            name:"血泵还输圈数",
                            data: curXbReturnRotated,
                            symbol:'circle',
                            symbolSize :4,
                            showAllSymbol:false,
                            itemStyle:{
                                color:'#af3ac4'
                            },
                            lineStyle:{
                                color:"#af3ac4",
                                width:1
                            },
                            areaStyle:{},
                            label:{
                                show:true
                            },
                            type: 'line'
                        },
                        {
                            name:"抗凝剂泵圈数",
                            data: knjRotated,
                            showAllSymbol:false,
                            symbol:'triangle',
                            symbolSize :4,
                            itemStyle:{
                                color:'#3ac464'
                            },
                            lineStyle:{
                                color:"#3ac464",
                                width:1
                            },
                            label:{
                                show:true
                            },
                            areaStyle:{},
                            type: 'line'
                        },
                        {
                            name:"血泵圈数",
                            data: xbRotated,
                            symbol:'circle',
                            showAllSymbol:false,
                            symbolSize :4,
                            itemStyle:{
                                color:'#e9bc65'
                            },
                            lineStyle:{
                                color:"#e9bc65",
                                width:1
                            },
                            areaStyle:{},
                            label:{
                                show:true
                            },
                            type: 'line'
                        },{
                            name:"抗凝剂全血比",
                            data: knjb,
                            showAllSymbol:false,
                            symbol:'triangle',
                            yAxisIndex:1,
                            symbolSize:4,
                            itemStyle:{
                                color:'#87cefa'
                            },
                            areaStyle:{},
                            lineStyle:{
                                color:"#87cefa",
                                width:1
                            },
                            label:{
                                show:true
                            },
                            type: 'line'
                        }]
                    };
                    let option2={
                        legend: {
                            data:['抗凝剂泵速度','离心机转速','血泵速度','抗凝剂电子称重量','血浆电子称重量']
                        },
                         tooltip: {
                            trigger: 'axis',
                            position: function (pt) {
                                return [pt[0], '10%'];
                            }
                         },
                        dataZoom:{},
                        xAxis: {
                            type: 'category',
                            data:timeData
                        },
                        axisPointer: {
                            link: {xAxisIndex: 'all'}
                        },
                        yAxis: [{
                            type: 'value',
                            name:'速度',
                            max:speedMax,
                            min:function(val){
                                if(speedMin > 0){
                                    return 0;
                                }else{

                                    return speedMin;
                                }
                            },
                            splitNumber:6
                        },{
                            type: 'value',
                            name:'重量',
                            max:weightMax,
                            min:function(val){
                                if(weightMin > 0){
                                    return 0;
                                }else{

                                    return weightMin;
                                }
                            },
                            splitNumber:6
                        }],
                        series: [{
                            name:"抗凝剂泵速度",
                            data: knjSpeed,
                            showAllSymbol:false,
                            symbol:'triangle',
                            symbolSize :4,
                            itemStyle:{
                                color:'#87cefa'
                            },
                            lineStyle:{
                                color:"#87cefa",
                                width:1
                            },
                            areaStyle:{},
                            label:{
                                show:true
                            },
                            type: 'line'
                        },
                        {
                            name:"离心机转速",
                            data: lxjSpeed,
                            showAllSymbol:false,
                            symbol:'diamond',
                            symbolSize :4,
                            itemStyle:{
                                color:'#af3ac4'
                            },
                            lineStyle:{
                                color:"#af3ac4",
                                width:1
                            },
                            areaStyle:{},
                            label:{
                                show:true
                            },
                            type: 'line'
                        },
                        {
                            name:"血泵速度",
                            data: xbSpeed,
                            showAllSymbol:false,
                            symbol:'circle',
                            symbolSize :4,
                            itemStyle:{
                                color:'#ee3e6f'
                            },
                            lineStyle:{
                                color:"#ee3e6f",
                                width:1
                            },
                            areaStyle:{},
                            label:{
                                show:true
                            },
                            type: 'line'
                        },
                         {
                            name:"抗凝剂电子称重量",
                            data: knjdzcWeight,
                            showAllSymbol:false,
                            symbol:'triangle',
                            symbolSize :4,
                            yAxisIndex:1,
                            itemStyle:{
                                color:'#3ac464'
                            },
                            lineStyle:{
                                color:"#3ac464",
                                width:1
                            },
                            areaStyle:{},
                            label:{
                                show:true
                            },
                            type: 'line'
                        },{
                            name:"血浆电子称重量",
                            data: xjdzcWeight,
                            showAllSymbol:false,
                            symbol:'roundRect',
                            symbolSize :4,
                            yAxisIndex:1,
                            itemStyle:{
                                color:'#e9bc65'
                            },
                            lineStyle:{
                                color:"#e9bc65",
                                width:1
                            },
                            areaStyle:{},
                            label:{
                                show:true
                            },
                            type: 'line'
                        }]
                    };
                    let option3={
                        legend: {
                            data:['管压值','袖带压力','红探值']
                        },
                         tooltip: {
                            trigger: 'axis',
                            axisPointer:{
                                type:'line',
                                snap:true,
                                alwaysShowContent:true
                            }
                         },
                        xAxis: {
                            type: 'category',
                            data:timeData
                        },
                        dataZoom:{},
                        axisPointer: {
                            link: {xAxisIndex: 'all'}
                        },
                        yAxis: [{
                            type: 'value',
                            name:'压力',
                            max:valueMax,
                            min:function(val){
                                if(valueMin > 0){
                                    return 0;
                                }else{

                                    return valueMin;
                                }
                            },
                            splitNumber:6
                        },{
                            type: 'value',
                            name:'红探值',
                            max:htMax,
                            min:function(val){
                                if(htMin > 0){
                                    return 0;
                                }else{

                                    return htMin;
                                }
                            },
                            splitNumber:6
                        }],
                        series: [{
                            name:"管压值",
                            data: gyValue,
                            symbol:'rect',
                            symbolSize :4,
                            showAllSymbol:false,
                            itemStyle:{
                                color:'#3ac1c4'
                            },
                            lineStyle:{
                                color:"#3ac1c4",
                                width:1
                            },
                            areaStyle:{},
                            label:{
                                show:true
                            },
                            type: 'line'
                        },
                        {
                            name:"袖带压力",
                            data: xyValue,
                            symbol:'rect',
                            symbolSize :4,
                            showAllSymbol:false,
                            itemStyle:{
                                color:'#af3ac4'
                            },
                            lineStyle:{
                                color:"#af3ac4",
                                width:1
                            },
                            areaStyle:{},
                            label:{
                                show:true
                            },
                            type: 'line'
                        },
                        {
                            name:"红探值",
                            data: htValue,
                            showAllSymbol:false,
                            symbol:'circle',
                            symbolSize :4,
                            yAxisIndex:1,
                            itemStyle:{
                                color:'#ee3e6f'
                            },
                            lineStyle:{
                                color:"#ee3e6f",
                                width:1
                            },
                            areaStyle:{},
                            label:{
                                show:true
                            },
                            type: 'line'
                        }]
                    }

                    myChart1.setOption(option1);
                    myChart2.setOption(option2);
                    myChart3.setOption(option3);
                    self.$echarts.connect([myChart3,myChart1,myChart2]);
                    window.addEventListener("resize", () => {
                      myChart1.resize();
                      myChart2.resize();
                      myChart3.resize();
                    });
                })
            },
    
    
    closeDCJDialog(){
      let that = this
      that.videoPath.videoPath1 = '';
      that.videoPath.videoPath2 = '';

    },
    // getAPI
    getCollMacRunningStatus(id) {
      loadingIn() 
      let that = this;
      let _data = {
        collectionDate: "2018-05-19"
      }
      if(that.checkedItem != []){
        let str = that.checkedItem.join(',')
        _data.nurseIdsStr = str
      }
      for(let i in that.ZHQueryData){
        if(that.ZHQueryData[i].isCheck){
          // console.log(that.ZHQueryData[i].isCheck)
          switch (that.ZHQueryData[i].startResquest) {
              case 'installTakensSmall':
                _data.installTakensSmall = that.ZHQueryData[i].start
                _data.installTakensBig = that.ZHQueryData[i].end
                break;
              case 'installSpaceTakensSmall':
                _data.installSpaceTakensSmall = that.ZHQueryData[i].start
                _data.installSpaceTakensBig = that.ZHQueryData[i].end
                break;
              case 'punctureTakensSmall':
                _data.punctureTakensSmall = that.ZHQueryData[i].start
                _data.punctureTakensBig = that.ZHQueryData[i].end
                break;
              case 'collectionTakensSmall_2':
                _data.collectionTakensSmall_2 = that.ZHQueryData[i].start
                _data.collectionTakensBig_2 = that.ZHQueryData[i].end
                break;
              case 'collectionTakensSmall_3':
                _data.collectionTakensSmall_3 = that.ZHQueryData[i].start
                _data.collectionTakensBig_3 = that.ZHQueryData[i].end
                break;
              case 'collectionTakensSmall_4':
                _data.collectionTakensSmall_4 = that.ZHQueryData[i].start
                _data.collectionTakensBig_4 = that.ZHQueryData[i].end
                break;
              case 'collectionTakensSmall_5':
                _data.collectionTakensSmall_5 = that.ZHQueryData[i].start
                _data.collectionTakensBig_5 = that.ZHQueryData[i].end
                break;
              case 'collectionTakensSmall_6':
                _data.collectionTakensSmall_6 = that.ZHQueryData[i].start
                _data.collectionTakensBig_6 = that.ZHQueryData[i].end
                break;
              case 'uninstallTakensSmall':
                _data.uninstallTakensSmall = that.ZHQueryData[i].start
                _data.uninstallTakensBig = that.ZHQueryData[i].end  
            }
        }
      }
      analysisHttp
        .getCollMacRunningStatus(_data)
        .then(res => {
          loadingClose()
          if (res.statusCode == 200 ) {
            that.ganttLink(id,res.content);
          }
        })
        .catch(reason => {
          loadingClose()
           that.ganttLink(id,[]);
        })
    },
    getProviderHjCount(id) {
      //获取所有浆员（折线图）数据
      loadingIn() 
      let that = this;
      analysisHttp.providerHjCount({ date: '2017-07-23' }).then(res => {
        if (res.statusCode == 200 ) {
          loadingClose()
          that.allPulp(id,res.content);
        }
      })
        .catch(reason => {
          loadingClose()
           that.allPulp(id,[]);
        })
    },
    getpulpingFrequency(id) {
      //获取生成全部浆员（饼图）数据
      loadingIn() 
      let that = this,_d=that.dataList;
      let _data = { date: '2017-10-26', 
       firstBlood:_d.firstBlood==''?14:_d.firstBlood,
       secondBlood:_d.secondBlood==''?28:_d.secondBlood,
       thirdBlood:_d.thirdBlood==''?42:_d.thirdBlood,
       fourthBlood:_d.fourthBlood==''?56:_d.fourthBlood}
      analysisHttp.getpulpingFrequency(_data).then(res => {
        loadingClose()
        if (res.statusCode == 200) {
          that.gradeAnalysisLink(id,res.content);
        }
      })
      .catch(reason => {
            loadingClose()
           that.gradeAnalysisLink(id,[]);
        })
    },
    newProviderDisplay(id) {
      //获取新浆员（散点图）数据
       loadingIn() 
      let that = this;
      analysisHttp.newProviderDisplay({ date: "2018-05-19" }).then(res => {
         loadingClose()
        if (res.statusCode == 200 ) {
          that.newPulp(id,res.content);
        }
      })
       .catch(reason => {
          oadingClose()
           that.newPulp(id,[]);
        })
    }
  }
};
</script>
<style lang="scss" scoped>
.data_box {
  & {
    padding-bottom: 10px;
  }
  & .el-button {
    margin-left: 10px;
  }
}

.bgImg {
  & {
    position: absolute;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 5px;
    box-shadow: 0 0 10px 10px #19386230;
  }
}
// 图表
#newPulpLinks,
#allPulpLinks,
#gantt,
#gradeAnalysis {
  & {
    width: 100%;
    height:35vh;
  }
}

// 放大弹出层
.chartDialog{
   width: 90%;
   height: 700px;
   margin: 0 auto;
}

// 设置天数弹出层
.intervalDayBox{
  &{margin-left: 14%;}
  & .el-input{
    width: 35%;margin-bottom: 20px;
  }
}
//  单采机运行状况详情 弹出层
.DCJBox{
      z-index: 999999999999 !important;
}
.DCJTitle{
  & {height: 30px;line-height: 30px;margin-bottom: 10px;font-size: 16px;}
  & span{
    display: inline-block;
    width: 5px;
    height: 100%;
    vertical-align: bottom;
    background-color: #89dadc;
  }
}
.JYList{
  & ul{width: 50%;display: inline-block;
    & li{padding: 5px 0 5px 10px;border-bottom: 1px #e4e7ed solid;}
  }
  & ul:first-child{
      &{background-color: #ebf9f9;
      color: #82848a;
      text-align: right;text-align: right;}
      & li{padding-right: 10px;border-bottom: 1px #75809485 solid;}
  }
}
.echartDom{height: 400px;}
// 筛查
.SCDialog{
  & .SCDBox{height: 423px;overflow-y: scroll;}
  & .SCTitle{height: 30px;line-height: 30px;margin-bottom: 10px;    font-size: 16px;}
  & span{
    display: inline-block;
    width: 3px;
    height: 100%;
    vertical-align: bottom;
    background-color: #89dadc;
  }
  & .checked{margin-bottom: 5px}
  & span.SCtips{
        display: inline-block;
    width: auto;
    color: #ea4444;
    font-size: 12px;
    background-color: transparent;
    margin-left: 10px;
  }
}
</style>
<style>
.DCJBox .el-dialog__header{padding-top: 0 !important;}
.JYInfo em ,.JYInfo span{display: inline-block;width: 50%;padding: 5px 0;}
.JYInfo em{
  text-align: right
}
.JYInfo a{display: none}
/* 筛查 */
.SCList{font-size: 14px;padding-top: 10px;}
.SCList>div{display: inline-block;width: 143px;}
.SCList .SCchecked{margin-right: 12px;} 
.SCList .el-input{ width: 200px;}
</style>

